#pragma once

#include "CustomListCtrl.h"

class CPage1 : public CResizableDialogImpl<CPage1>
{
	typedef CResizableDialogImpl<CPage1> baseClass;
public:
	enum { IDD = IDD_DLG_TAB1 };

	// BOOL PreTranslateMessage(MSG* pMsg);

	BEGIN_MSG_MAP(CPage1)
		CHAIN_MSG_MAP(baseClass)
		MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
// 		COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
// 		COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
		MESSAGE_HANDLER(WM_SIZE, OnSize)
		// MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
		NOTIFY_HANDLER(IDC_LIST_DATA, NM_CLICK/*LVN_ITEMCHANGED*/, OnLvnItemchangedList)
		REFLECT_NOTIFICATIONS()
	END_MSG_MAP()

	// Handler prototypes (uncomment arguments if needed):
	//	LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
	//	LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
	//	LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)

//	LRESULT OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);

	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnSize(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnEraseBkgnd(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnLvnItemchangedList(int /*idCtrl*/, LPNMHDR pNMHDR, BOOL& /*bHandled*/);

public:
	BOOL InsertData(int nID, CString strTime, CString strTitle, int size, LPSTR lpData);

protected:
	CListViewCtrl m_lstData;
	// CRichEditCtrl m_richEdit;
	CEdit m_richEdit;
	CHorSplitterWindow m_wndSplit;
	UINT m_nCurItem;
};
